import Cookies from 'js-cookie'

const userKey = 'user'

export function getUser() {
    let value = Cookies.get(userKey)
    if (value != null) {
        return JSON.parse(value)
    }
    return value
}

export function setUser(value) {
    return Cookies.set(userKey, value, { expires: 7 });
}
export function removeUser() {
    return Cookies.remove(userKey)
}
export function setSkin(value) {
    return window.sessionStorage.setItem("skin", value)
}
export function getSkin() {
    return window.sessionStorage.getItem("skin")
}
export function setUrl(value) {
    return window.sessionStorage.setItem("baseUrl", value)
}
export function getUrl() {
    return window.sessionStorage.getItem("baseUrl")
}
